package com.zhong.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.zhong.common.annotation.Excel;
import com.zhong.common.annotation.QueryField;
import com.zhong.common.core.domain.BaseEntity;
import com.zhong.common.core.enums.QueryCondition;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 参数配置表 sys_config
 *
 * @author zhongzc
 */
@Data
@TableName("sys_config")
@Table(comment = "参数配置表", name = "sys_config", isSimple = true)
public class SysConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 参数名称 */
    @Excel(name = "参数名称")
    @NotBlank(message = "参数名称不能为空")
    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
    @QueryField(condition = QueryCondition.like)
    @Column(comment = "参数名称",length = 100)
    private String configName;

    /** 参数键名 */
    @Excel(name = "参数键名")
    @NotBlank(message = "参数键名长度不能为空")
    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
    @QueryField(condition = QueryCondition.like)
    @Column(comment = "参数键名",length = 100)
    private String configKey;

    /** 参数键值 */
    @Excel(name = "参数键值")
    @NotBlank(message = "参数键值不能为空")
    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
    @QueryField(condition = QueryCondition.like)
    @Column(comment = "参数键值",length = 500)
    private String configValue;

    /** 系统内置（Y是 N否） */
    @Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
    @Column(comment = "系统内置（Y是 N否）",type = MySqlTypeConstant.CHAR)
    private String configType;

    /** 备注 */
    @Excel(name = "备注")
    @Column(comment = "备注",type = MySqlTypeConstant.TEXT)
    private String remark;
}
